import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

const timeNow = 'Vue_admin_time'
// 设置当前的时间戳
export function setTokenTime(time) {
  return Cookies.set(timeNow, time)
}
// 取时间戳
export function getTokenTime(time) {
  return Cookies.get(timeNow, time)
}
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
